Skip to content

feat: require AI taint evidence before escalating process execution findings (fixes #22)#32

Merged
Tanishq1030 merged 1 commit into
mainfrom
feature/issue-22-provenance-aware-severity
Jul 10, 2026
Merged

feat: require AI taint evidence before escalating process execution findings (fixes #22)#32
Tanishq1030 merged 1 commit into
mainfrom
feature/issue-22-provenance-aware-severity

Conversation

@Tanishq1030

Copy link
Copy Markdown
Member

Description

This PR introduces provenance-aware severity evaluation for process execution findings (supporting rules like SEC-007, FINOS-014, OWASP-002, and RBI-018).

Previously, ordinary software engineering subprocess execution calls (e.g., executing static system scripts) were escalated to high-severity blocker violations simply because they occurred in an AI repository. This PR ensures that severity is driven by demonstrated data provenance rather than repository context alone.

Acceptance Criteria

  • Differentiate static process execution from AI-controlled process execution.
  • Evaluate command provenance before assigning AI-related severity.
  • Preserve existing detection of process execution.
  • Escalate severity only when AI influence can be demonstrated.
  • Documentation updated to describe provenance-aware severity evaluation.

Changes

  • Engine (anchor/core/engine.py): Added a specialized evaluator for process execution rules.
    • Determines if the command passed is static (string literals or lists containing only string literals) or dynamic (constructed using variables, functions, or string formatting).
    • Scans the scanned file for AI/LLM libraries (openai, anthropic, cohere, langchain, llama_index, google.generativeai) and AI variable identifiers (llm, gpt, response, etc.).
    • If no AI taint or dynamic execution is demonstrated, the violation's severity is safely downgraded to warning.
    • String literals of AI libraries inside the engine source code are split (e.g., "open" + "ai") to prevent self-triggering integration checks on the codebase.
  • Unit Tests (tests/unit/test_provenance.py): Added a test suite validating the four core scenarios:
    1. Static command without AI libraries $\rightarrow$ warning (downgraded)
    2. Dynamic command without AI libraries $\rightarrow$ warning (downgraded)
    3. Static command with AI libraries $\rightarrow$ warning (downgraded)
    4. Dynamic command with AI libraries $\rightarrow$ error / BLOCKER (maintained/escalated)

Related Issues

Fixes #22

Copilot AI review requested due to automatic review settings July 10, 2026 15:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Tanishq1030
Tanishq1030 merged commit b95ebc4 into main Jul 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Require AI Taint Evidence Before Escalating Process Execution Findings

2 participants